#include <Model/Include/Element.h>

using namespace Model;

// ========== LIFECYCLE ========== //

Element::Element(const int &pos_x, const int &pos_y)
{
    this->x = pos_x;
    this->y = pos_y;
    this->next_element = 0;
}

Element::~Element()
{
}

// ========== OVERLODED OPERATORS ========== //

// ========== METHODS ========== //
void Element::move(const int &new_x_position, const int &new_y_position)
{
    if( 0 != this->next_element )
    {
        this->next_element->move(this->x, this->y);
    }
    this->x = new_x_position;
    this->y = new_y_position;
}

// ========== GETTERS ========== //
int Element::getXPosition() const
{
    return this->x;
}

int Element::getYPosition() const
{
    return this->y;
}

const Element* Element::getNextElement() const
{
    return this->next_element;
}

// ========== SETTERS ========== //

void Element::setPosition(const int& new_x_position, const int& new_y_position)
{
    this->x = new_x_position;
    this->y = new_y_position;
}

void Element::setNextElement(Element* element)
{
    this->next_element = element;
}

// ========== INQUIRY ========== //

// ========== INTERNAL METHODS ========== //
